home *** CD-ROM | disk | FTP | other *** search
- Path: news.hik.se!usenet
- From: td93aj@te.hik.se (Andreas Johansson)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Visual E - New E Developer Tool - vedev.gif (0/1)
- Date: Wed, 27 Mar 1996 09:17:01 GMT
- Organization: Capitex
- Message-ID: <315906f0.9219429@news.hik.se>
- References: <68772090@0humpty.tomate.tng.oche.de> <Dou4u8.2H1@cix.compulink.co.uk>
- Reply-To: td93aj@te.hik.se
- NNTP-Posting-Host: mia95joa.dialin.hik.se
- X-Newsreader: Forte Agent .99c/16.141
-
- E versus C/C++ (+ quest. How do I make a library in E?)
-
- >A Visual E may be a good toy for amateur programmers to play with, but
- >anything based around E cannot be a professional development system, IMHO.
-
-
- FIRST I MUST SAY I'M VERY SORRY ABOUT THAT BINARY FILE THAT I SEND TO
- THE DISCUSSION GROUP. I CAN UNDERSTAND NOW THAT IT WAS FOOLISH OF ME.
-
- Don't start a war with E against C/C++, and why always call something
- a toy, when it is easy to use.
-
- My profession is program development for PC, where much code is
- written in C/C++ and Visual Basic (I guess you will call VB a toy also
- and of course it's slow, but not a toy. When you have it for
- profession and can make money on it I would call it professional. If
- you look on it in that way I think that most of the development for
- the Amiga is not professional, so I can agree that Visual E is for
- amatueres but it's not a toy, it's a very nice tool). In the spare
- time i write some programs for Amiga. Before I have tested E, I used
- Maxon C++. So have have tried both very much.
-
- Good arguments to use C/C++
- ---------------------------
- 1) This expressions works in C but not in E, and it sucks without
- them:
-
- -------------------------------------------
- Accessing the pointer to a member variable:
- -------------------------------------------
- C/C++
- &(test->myptr)=10;
-
- E (should be, but doesn't work)
- {test.tjoho}:=10
- -----------------------------------
- Case statment on a member variable:
- -----------------------------------
- C/C++
- switch(test->myvar)
- {
- .....
- }
-
- E (should be, but doesn't work)
- SELECT test.myvar
- .....
- ENDSELECT
- --------------------------------------------------------------
- A hole structure in a functionheader:
- (I got that problem when i tried to write a BOOPSI class in E,
- please do anyone have a solution for this?)
- --------------------------------------------------------------
- C/C++
- void *dispatcher(Class *class, Object *object, Msg msg) //(or
- something like that)
- {
- .....
- }
-
- E
- PROC dispathcer(class:PTR TO iclass, object:PTR TO object, msg:PTR TO
- msg)
- ......
- ENDPROC
- ----------------------------------------------------------------
-
-
- 2) In some ways more advanced linker and header files
- ------------------------------------------------------
-
- In C++ you can have then a class header in a .h file. And the code
- for the functions in .o files.
-
- .h file:
- class test
- {
- void tjoho();
- };
-
- .o file before compiled:
- void test::tjoho()
- {
- }
-
- In E you must have the code and the object header in the same file.
-
- OBJECT test
- ENDOBJECT
-
- PROC tjoho() OF test
- ENDPROC
- --------------------------------------------------------
-
-
- Now some good arguments for E:
- -------------------------------
- There are only one E compiler, no strange variations. No
- troubleshoothing with different kinds of .lib files or anything.
-
- More integrated with the inline assembler. In C there are some strange
- variations how to write the inline assembler, because it's not a part
- of any C standard.
-
- More Amiga feeling in E, because of it's so close to assembler.
-
- Compacter code in most cases.
-
- A lot of C-compilers do not have precompiled headerfiles, but E have
- the module system, and a module is always compiled.
-
- Not so strong typechecking. I know that you can use void * and long in
- C almost like E, but you always have to write typeconversions and that
- makes the code not look so good.
-
- I haven't lookt so much on the LISP alike functions in E, but there
- are nothing like that in C.
-
- VERY FAST COMPILNG
-
- YOU CAN COMPILE A PROGRAM WITHOUT THAT 10 MB THAT YOU DIDN'T AFFORD.
- ---------------------------------------------------------------------
-
- And now for my questions:
-
- 1) How do I write a whole library in E or C.
-
- The only problem I have in E is that this code doesn't work
-
- label:
- .
- .
- .
- rts
-
- LONG label -> Here I get a compiler error because this must be a
- direct value.
-
- 2) Or how do I write some of the code in E?
-
- The problem that I've got here is that I can't produce a .o (asm/C
- object file) to link with the assembler code (witch have the library
- initialization-code).
-
- 3) And how do I make a E modules that looks like below when I run
- ShowModule on it?
-
- LIBRARY blabla
- Test(A0)
- ENDLIBRARY
-
- //Per Jonsson
- ---
- Signature file located at ftp://ftp.net.net/dev/null
-